package com.sophossystems.client.asmon.dto;

import java.io.Serializable;


/** 
 * This class represents the primary key of the Activity table.
 */
public class ActivityPkDTO implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -5188279055680007331L;

	protected int idActivity;

	/** 
	 * This attribute represents whether the primitive attribute idActivity is null.
	 */
	protected boolean idActivityNull;

	/** 
	 * Sets the value of idActivity
	 */
	public void setIdActivity(int idActivity)
	{
		this.idActivity = idActivity;
	}

	/** 
	 * Gets the value of idActivity
	 */
	public int getIdActivity()
	{
		return idActivity;
	}

	/**
	 * Method 'ActivityPk'
	 * 
	 */
	public ActivityPkDTO()
	{
	}

	/**
	 * Method 'ActivityPk'
	 * 
	 * @param idActivity
	 */
	public ActivityPkDTO(final int idActivity)
	{
		this.idActivity = idActivity;
	}

	/** 
	 * Sets the value of idActivityNull
	 */
	public void setIdActivityNull(boolean idActivityNull)
	{
		this.idActivityNull = idActivityNull;
	}

	/** 
	 * Gets the value of idActivityNull
	 */
	public boolean isIdActivityNull()
	{
		return idActivityNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	@Override
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof ActivityPkDTO)) {
			return false;
		}
		
		final ActivityPkDTO _cast = (ActivityPkDTO) _other;
		if (idActivity != _cast.idActivity) {
			return false;
		}
		
		if (idActivityNull != _cast.idActivityNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	@Override
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idActivity;
		_hashCode = 29 * _hashCode + (idActivityNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	@Override
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.sophossystems.client.asmon.dto.ActivityPk: " );
		ret.append( "idActivity=" + idActivity );
		return ret.toString();
	}

}
